home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol C-14
/
Vol C-14.iso
/
games
/
peanut.swf
/
scripts
/
DefineSprite_84
/
frame_12
/
DoAction.as
Wrap
Text File
|
2012-04-23
|
1KB
|
52 lines
if(count < distance)
{
set("../:def1X",_X);
if(eval("../:def1X") + speed < "420")
{
set("../:def1X",eval("../:def1X") + speed);
_X = eval("../:def1X");
puckHitX = eval("../:def1X") - (eval("../:puckX") - "5");
puckHitY = ("63.75" - eval("../:puckZ")) * "4";
power = eval("../puck:puckpower");
if("0" < puckHitX and puckHitX < "50" and (- "1") * power < puckHitY and puckHitY < power)
{
if("20" >= power)
{
set("../:score",eval("../:score") + "40");
gotoAndPlay(20);
set("../:puckSmash","1");
}
else if("20" < power and power < "25")
{
set("../:puckSmash","1");
gotoAndStop(35);
}
else if(power >= "25" and power < "32")
{
set("../:score",eval("../:score") + "50");
set("../:puckSmash","1");
gotoAndPlay(15);
}
else
{
count += "1";
prevFrame();
}
}
else
{
count += "1";
prevFrame();
}
}
else
{
count = distance;
prevFrame();
}
}
else
{
gotoAndPlay(1);
}